<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>如何识别数组 1</title>
</head>

<body>
    <h1>JavaScript 数组</h1>
    <p>当在数组上使用时，instanceof 运算符返回true：</p>
    <p id="demo"></p>
    <script>
        var fruits = ["B", "A", "E", "A"];
        document.getElementById("demo").innerHTML = fruits instanceof Array;
    </script>
</body>

</html>